using System;
using System.Xml;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;
using Microsoft.Xna.Framework.Content.Pipeline;
using Microsoft.Xna.Framework.Content.Pipeline.Graphics;
using Microsoft.Xna.Framework.Content.Pipeline.Processors;
using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler;
using PrototypeGame;
using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Intermediate;
using UnitLibrary;
using FarseerGames.FarseerPhysics.Collisions;
using FarseerGames.FarseerPhysics;
using UnitLibrary.GameObjects.Physics; 
using UnitLibrary.GameObjects.Units;
using FarseerGames.FarseerPhysics.Dynamics;
using UnitLibrary.GameObjects.UnitReaders;
using TYPE = UnitLibrary.GameObjects.Units.Player;
using System.Text;

namespace PrototypeGame
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main(string[] args)
        {
            
            UnitLibrary.GameObjects.UnitReaders.ObjectSerialization<TYPE>.Serialize(typeof(TYPE).Name + "Template");
            //TYPE testData = new TYPE();
            //XmlWriterSettings settings = new XmlWriterSettings();
            //settings.Indent = true;
            //settings.ConformanceLevel = ConformanceLevel.Auto;
            //string loc = "H:\\";
            //using (XmlWriter writer = XmlWriter.Create(loc + ".xml", settings))
            //{
            //    IntermediateSerializer.Serialize(writer, testData, loc.ToString());
            //}
            /*
            TYPE testData = new TYPE();

            XmlWriterSettings settings = new XmlWriterSettings();
            settings.Indent = true;
            settings.ConformanceLevel = ConformanceLevel.Auto;
            StringBuilder location =
             new StringBuilder("H:\\Saeculum\\AttackTest\\Content\\" + typeof(TYPE).FullName + "\\" + typeof(TYPE).Name + "default");
            location.Replace(".", "\\");            
            using (XmlWriter writer = XmlWriter.Create(location + ".xml", settings))
            {
                IntermediateSerializer.Serialize(writer, testData, location.ToString() );
            //}
            */
            using (PrototypeGame game = new PrototypeGame())
            {
                game.Run();
            }
        }
    }
}

